﻿@model DSAAssignment.Models.FaultLogin

@{
    ViewBag.Title = "ReportProductFaults";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>ReportProductFaults</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>FaultLogin</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.UserName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.UserName)
            @Html.ValidationMessageFor(model => model.UserName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Token)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Token)
            @Html.ValidationMessageFor(model => model.Token)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Pin)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Pin)
            @Html.ValidationMessageFor(model => model.Pin)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.OrderID)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.OrderID)
            @Html.ValidationMessageFor(model => model.OrderID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ProductID)
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.ProductID)
            @Html.ValidationMessageFor(model => model.ProductID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Category)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Category, Model.CategoryList)
            @Html.ValidationMessageFor(model => model.Category)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FaultDetail)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FaultDetail)
            @Html.ValidationMessageFor(model => model.FaultDetail)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Take Me back", "MyPurchaseProducts","Home") Jekk ma thadmix amel new {controller = Home}
</div>
